package com.liuzhilong.test.api;

import java.util.Optional;
import java.util.stream.Stream;

public class StreamsAdd {

    public static void main(String[] args) {
        Stream.of(1,2,3,4,5)
                .takeWhile(item->item<5)
                .dropWhile(item->item>3)
                .forEach(System.out::println);

        Optional.of(3).stream().forEach(System.out::println);


    }

}
